
package guoan.domain;

import guoan.core.jodaJson.DateTimeYYYYMMDDHHMMSSSerializer;
import guoan.core.jodaJson.DateTimeYYYYMMDDSerializer;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Type;
import org.joda.time.DateTime;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;

/**
 * 考试报名
 * 
 */
@Entity
@Table(name = "exam_item")
public class ExamItem implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * ID 自动增长
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 学院联系电话1
     */
    @Column(name = "contact_number_f")
    private String contactNumberF;

    /**
     * 学院联系电话2
     */
    @Column(name = "contact_number_s")
    private String contactNumberS;

    /**
     * 考试开放时间
     */
    @Column(name = "open_hours")
    private Long openHours;

    /**
     * 考试ID
     */
    @Column(name = "exam_id")
    private Long examId;

    /**
     * 考试标题
     */
    @Column(name = "exam_title")
    private String examTitle;

    /**
     * 学员绑定编号
     */
    @Column(name = "student_key")
    private String studentKey;

    /**
     * 学员姓名
     */
    @Column(name = "student_name")
    private String studentName;

    /**
     * 学员编号
     */
    @Column(name = "student_no")
    private String studentNo;

    /**
     * 学员微信openid
     */
    @Column(name = "student_openid")
    private String studentOpenid;
    
    /**
     * 车型
     */
    private String carType;

    /**
     * 考试时间
     */

    @Column(name = "exam_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonSerialize(using = DateTimeYYYYMMDDSerializer.class)
    @Type(type = "org.jadira.usertype.dateandtime.joda.PersistentDateTime")
    private DateTime examTime;
    /**
     * 报名时间
     */
    @Column(name = "join_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = DateTimeYYYYMMDDHHMMSSSerializer.class)
    @Type(type = "org.jadira.usertype.dateandtime.joda.PersistentDateTime")
    private DateTime joinTime;

    @Column(name = "random_key")
    private String randomKey;

    public ExamItem(){
    }

    public Long getId(){
        return this.id;
    }

    public void setId(Long id){
        this.id = id;
    }

    public String getContactNumberF(){
        return this.contactNumberF;
    }

    public void setContactNumberF(String contactNumberF){
        this.contactNumberF = contactNumberF;
    }

    public String getContactNumberS(){
        return this.contactNumberS;
    }

    public void setContactNumberS(String contactNumberS){
        this.contactNumberS = contactNumberS;
    }

    public Long getOpenHours(){
        return openHours;
    }

    public void setOpenHours(Long openHours){
        this.openHours = openHours;
    }

    public Long getExamId(){
        return this.examId;
    }

    public void setExamId(Long examId){
        this.examId = examId;
    }

    public String getExamTitle(){
        return this.examTitle;
    }

    public void setExamTitle(String examTitle){
        this.examTitle = examTitle;
    }

    public String getStudentKey(){
        return this.studentKey;
    }

    public void setStudentKey(String studentKey){
        this.studentKey = studentKey;
    }

    public String getStudentName(){
        return this.studentName;
    }

    public void setStudentName(String studentName){
        this.studentName = studentName;
    }

    public String getStudentNo(){
        return this.studentNo;
    }

    public void setStudentNo(String studentNo){
        this.studentNo = studentNo;
    }

    public String getStudentOpenid(){
        return this.studentOpenid;
    }

    public void setStudentOpenid(String studentOpenid){
        this.studentOpenid = studentOpenid;
    }

    public DateTime getExamTime(){
        return this.examTime;
    }

    public void setExamTime(DateTime examTime){
        this.examTime = examTime;
    }

    public DateTime getJoinTime(){
        return joinTime;
    }

    public void setJoinTime(DateTime joinTime){
        this.joinTime = joinTime;
    }

    public String getRandomKey(){
        return randomKey;
    }

    public void setRandomKey(String randomKey){
        this.randomKey = randomKey;
    }

    public String getCarType() {
		return carType;
	}

	public void setCarType(String carType) {
		this.carType = carType;
	}

	@Override
    public String toString(){
        return "ExamItem [id=" + id + ", contactNumberF=" + contactNumberF
                + ", contactNumberS=" + contactNumberS + ", openHours="
                + openHours + ", examId=" + examId + ", examTitle=" + examTitle
                + ", studentKey=" + studentKey + ", studentName=" + studentName
                + ", studentNo=" + studentNo + ", studentOpenid="
                + studentOpenid + ", examTime=" + examTime + ", joinTime="
                + joinTime + "]";
    }

}